package com.yupi.project.bizmq;

import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

@Component
public class MyMessageProducer {

    @Resource
    private RabbitTemplate rabbitTemplate;

    public void sendMessage(String exchange, String rountingKey, String message) {
        rabbitTemplate.convertAndSend(exchange, rountingKey, message);
    }
}
